package com.xiaojian.pick.page;

import com.xiaojian.pick.entity.User;
import lombok.Data;

/**
 * @author 小贱
 * @date 2020/11/2 - 9:03
 *  登录时返回给小程序端的数据
 */
@Data
public class ReturnData {
    private User user;
    private boolean success;
    private String message;
    private String haveUserInfo;
    private String token;

    public ReturnData() {
    }

    public ReturnData(User user, boolean success, String message, String haveUserInfo, String token) {
        this.user = user;
        this.success = success;
        this.message = message;
        this.haveUserInfo = haveUserInfo;
        this.token = token;
    }

    @Override
    public String toString() {
        return "ReturnData{" +
                "user=" + user +
                ", success=" + success +
                ", message='" + message + '\'' +
                ", haveUserInfo='" + haveUserInfo + '\'' +
                ", token='" + token + '\'' +
                '}';
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getHaveUserInfo() {
        return haveUserInfo;
    }

    public void setHaveUserInfo(String haveUserInfo) {
        this.haveUserInfo = haveUserInfo;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public ReturnData(boolean success, String message) {
        this.success = success;
        this.message = message;
    }

    public ReturnData(boolean success, String message, String haveUserInfo,User user) {
        this.success = success;
        this.message = message;
        this.haveUserInfo = haveUserInfo;
        this.user = user;
    }
}
